<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>确认保单</title>
<meta name="viewport"
	content="width=device-width,initial-scale=1.0,user-scalable=no" />
<!-- 添加到桌面快捷方式小图标 -->
<link rel="apple-touch-icon-precomposed" href="#">
<!-- 指定快捷方式标题 -->
<meta name="apple-mobile-web-app-title" content="志惠科技">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/auto_insurance.css">
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/auto_insurance.js"></script>
<script>
	$(function() {
		$(".policy_details_btn").click(function() {
			$(".policy_zeng").css("display", "block");
			$(".policy_zhao").css("display", "block");
		});
		$(".comfirm_btn").click(function() {
			$(".policy_zeng").css("display", "none");
			$(".policy_zhao").css("display", "none");
		});
	});
	function showdiv() {
		$.ajax({
			url : "${ctx}/sendMsg",
			type : "POST",
			data : {
				proposalNo : $("#proposalNo").val()
			},
			success : function(list) {
				$("#window").show();
			}
		});
	}
	function hidediv() {
		$("#window").hide();
	}
	function pay() {
	//手机验证码非空判断
	if (isEmptyNo($("#authentiCode").val())) {
		$("#authentiCode").attr("class", "authentiCode");
		$("#authentiCode").attr("placeholder", "验证码不能为空");
	}
		$("#listForm").submit();

	}
	$(function() {
		var errMsg = $("#err").val();
		if (errMsg == "false") {
			$("#errWindow").show();
		}
	});
	
	// 非空
function isEmptyNo(empty) {
	if (empty.trim().length < 1) {
		return true;
	} else {
		return false;
	}
}
	
</script>
<style>
/*弹出层*/
.policy_zeng {
	position: fixed;
	width: 100%;
	height: 100%;
	background: #000;
	opacity: 0.5;
	z-index: 8888;
	display: none;
}

.policy_zhao {
	width: 84%;
	background-color: #ffffff;
	position: fixed;
	left: 50%;
	top: 50%;
	margin-left: -42%;
	margin-top: -118px;
	background: #fff;
	z-index: 9999;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	display: none;
}

.policy_zhao>h2 {
	width: 90%;
	margin: 0 auto;
	font-size: 1.6rem;
	color: #555555;
	text-align: center;
	padding: 1.3rem 0;
	border-bottom: solid 1px #dddddd;
}

.policy_zhao>p {
	padding: 1.8rem 0;
}

.policy_zhao>p>input {
	display: block;
	width: 52.5%;
	margin: 0 auto;
	text-align: center;
	font-size: 1.4rem;
	color: #b3b3b3;
	border: solid 1px #dddddd;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	padding: 1rem 0;
}

.policy_zhao>.zhao_bot {
	border-top: solid 1px #fd6538;
}

.policy_zhao>.zhao_bot>a {
	display: block;
	width: 50%;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	padding: 1.2rem 0;
	float: left;
	text-align: center;
	font-size: 1.6rem;
	color: #ff5050;
}

.policy_zhao>.zhao_bot>a.bg {
	background: #fd6538;
	color: #FFFFFF;
}
</style>
</head>
<body class="body_bg" style="background-color: #f9f9f9;">
	<!--
    	作者：756631153@qq.com
    	时间：2016-03-14
    	描述：弹出层
    -->
	<div class="policy_zeng"></div>
	<div class="policy_zhao" id="window">
		<h2>提示</h2>
		<p>
			<input type="text" id="authentiCode" name="authentiCode" 
				placeholder="请输入手机验证码" />
		</p>
		<div class="zhao_bot">
			<a href="#" class="comfirm_btn" onclick="hidediv()">取消支付</a> <a
				href="#" class="comfirm_btn bg" onclick="pay()">确认支付</a>
		</div>
	</div>
	<header class="car_top">
		<a href="javascript:history.go(-1);">返回</a>保单确认
	</header>
	<form id="listForm" action="${ctx }/pay/payment" method="post">
		<input type="hidden" name="proposalNo" value="${proposalNo }"
			id="proposalNo" /> <input type="hidden" value="${ownList }"
			id="ownList" /><input type="hidden" value="${err }" id="err">
		<div class="confirm_policy_container">
			<!--保单信息开始-->
			<div class="slide_content">
				<h1 class="open_content">
					<em></em>保单信息<span></span>
				</h1>
				<div class="confirm_policy_content">
					<div class="confirm_policy_main">
						<!-- <h1 class="clearfix">
							商业险<em class="fr"></em>
						</h1> -->
						<ul>
							<c:forEach items="${ordersList }" var="v" varStatus="vs">
								<li class="clearfix">${v.code_name }<em class="fr">￥${v.sumInsured}</em>
								</li>
							</c:forEach>
						</ul>
						<!-- 						<h1 class="clearfix"> -->
						<!-- 							交强险<em class="fr"></em> -->
						<!-- 						</h1> -->
						<!-- 						<ul> -->
						<!-- 							<c:forEach items="${jia }" var="v" varStatus="vs"> -->
						<!-- 								<li class="clearfix">${v.code_name }<em class="fr">￥${v.sumInsured -->
						<!-- 										}</em> -->
						<!-- 								</li> -->
						<!-- 							</c:forEach> -->
						<!-- 						</ul> -->
					</div>
				</div>
			</div>
			<!--保单信息结束-->
			<!--人员信息开始-->
			<div class="slide_content">
				<h1 class="open_content">
					<em></em>人员信息<span></span>
				</h1>
				<div class="confirm_policy_content">
					<div class="confirm_policy_main">
						<h1>车主信息</h1>
						<ul>
							<li class="clearfix">姓名<em class="fr">${ownList[0].carOwnerName
									}</em>
							</li>
							<li class="clearfix">身份证号<em class="fr">${ownList[0].carOwnerIdNo
									}</em>
							</li>
							<li class="clearfix">常住地址<em class="fr">${ownList[0].carOwnerAdd
									}</em>
							</li>
						</ul>
						<h1>投保人信息</h1>
						<ul>
							<li class="clearfix">姓名<em class="fr">${ownList[0].appliName
									}</em>
							</li>
							<li class="clearfix">手机号码<em class="fr">${ownList[0].appliPhoneNo
									}</em>
							</li>
							<li class="clearfix">身份证号<em class="fr">${ownList[0].appliIdNo
									}</em>
							</li>
							<li class="clearfix">电子邮箱<em class="fr">${ownList[0].appliEmail
									}</em>
							</li>
							<li class="clearfix">常住地址<em class="fr">${ownList[0].appliAdd
									}</em>
							</li>
						</ul>
						<h1>被保人信息</h1>
						<ul>
							<li class="clearfix">姓名<em class="fr">${ownList[0].insuredName
									}</em>
							</li>
							<li class="clearfix">身份证号<em class="fr">${ownList[0].insuredIdNo
									}</em>
							</li>
						</ul>
						<h1>签收人信息</h1>
						<ul>
							<li class="clearfix">姓名<em class="fr">${ownList[0].reciName
									}</em>
							</li>
							<li class="clearfix">手机号码<em class="fr">${ownList[0].reciPhoneNo
									}</em>
							</li>
							<li class="clearfix">常住地址<em class="fr">${ownList[0].reciAdd
									}</em>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<!--人员信息结束-->
			<!--车辆信息开始-->
			<div class="slide_content">
				<h1 class="open_content">
					<em></em>车辆信息<span></span>
				</h1>
				<div class="confirm_policy_content">
					<div class="confirm_policy_main">
						<h1>${carList[0].licenseNo }</h1>
						<ul>
							<li class="clearfix">车主姓名<em class="fr">${carList[0].name
									}</em>
							</li>
							<li class="clearfix">车辆品牌<em class="fr">${carList[0].carBrand
									}</em>
							</li>
							<li class="clearfix">车辆型号<em class="fr">${carList[0].modelCode
									}</em>
							</li>
							<li class="clearfix">发动机号<em class="fr">${carList[0].engineNo
									}</em>
							</li>
							<li class="clearfix">车辆初登日期<em class="fr">${carList[0].enrollDate
									}</em>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<!--车辆信息结束-->
			<!--申明开始-->
			<div class="slide_content">
				<h1 class="open_content">
					<i class="check_yes"></i>本人同意以下保险约定申明<span></span>
				</h1>
				<div class="confirm_policy_content">
					<div class="confirm_policy_main">
						<p>
							保险人已向本人详细展示了<a href="#">投保险种所适用的条款</a>，并对其中免除保险人责任的条款（包括责任免除条款、免赔额、免赔率等免除或者减轻保险人责任的条款），以及本保险合同中付费约定的内容向本人作了明确展示，本人已充分理解并接受上述内容，同意以此作为订立保险合同的依据。本人自愿投保上述险种。
						</p>
					</div>
				</div>
			</div>
			<!--申明结束-->
		</div>
		<a href="#" class="policy_details_btn" onclick="showdiv()">确认支付（共2354.00元）</a>
	</form>
</body>
</html>